www.gusucode.com > 落叶冰点万能企业网站内容管理系统 V9.1 > 落叶冰点万能企业网站内容管理系统 V9.1\code\admin\adminTemplates_qiye\D_edit_admin_zi_templates.asp
<% '************************************************************** ' 新动软网站管理系统 ' 官方网站: http://www.aspcpu.com ' 系统作者: 阮丁远(网名:天下程序) ' Copyright 新动软网站管理系统 版权所有 '************************************************************** %> <htmL> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <LINK href="../css.css" type=text/css rel=stylesheet> <% dir_set="../../" %> <!--#include file=../../inc/conn.asp--> <!--#include file=../../inc/Functionb.asp--> <!--#include file=../../inc/ajaxLIB.asp--> <!--#include file=../inc/checkadmin2.asp--> <!--#include file=../../inc/functionFiless.asp--> <!--#include file=../../inc/ND_class_function.asp--> <!--#include file=../../inc/ND_moban_page_type.asp--> <% AJAXshowLoader() %> <% if request("pid")<>"" and cstr(request("pid"))<>"" then set rs1aa=server.CreateObject("adodb.recordset") rs1aa.open "select * from ND_templates_folder_reg_qiye where id="&request("pid"),conn,1,1 fnnnnnname=rs1aa("templates_folder_path_name") session("fffmmme")=fnnnnnname else fnnnnnname=session("fffmmme") end if ppath="templates/"&fnnnnnname&"/" scrt_ff="../../"&ppath&iscrtfile use_http_url=0 use_http_post=0 set fileaw=new Cls_FSO set filebw=new DosAsp is_have_nlist=1 if fileaw.ReportFileStatus(server.mappath(scrt_ff))=-1 then is_have_nlist=0 else '模板目录下存在"&iscrtfile&"安装脚本文件 xm_d_c=ReadXMLDocument(scrt_ff,"all_web_file_name_and_type_config") scrt_fff="../../"&ppath&xm_d_c if fileaw.ReportFileStatus(server.mappath(scrt_fff))=-1 then is_have_nlist=0 end if end if if is_have_nlist=1 then 'on error resume next on error resume next ppath="templates/"&fnnnnnname&"/" scrt_ff="../../"&ppath&iscrtfile xm_d_c=ReadXMLDocument(scrt_ff,"all_web_file_name_and_type_config") scrt_ff="../../"&ppath&xm_d_c set aasc=ReadXMLDocument_nodes(scrt_ff,"files/file_reg") end if function find_ptyx(t) aassaafd="" ddssddfd="" eesseefd="" for aiaa=0 to aasc.length-1 aassaa=trim(rep_xml_br(aasc(aiaa).selectSingleNode("filetype").text)) bbssbb=trim(rep_xml_br(aasc(aiaa).selectSingleNode("filename").text)) ccsscc=trim(rep_xml_br(aasc(aiaa).selectSingleNode("to_html_filename").text)) ddssdd=trim(rep_xml_br(aasc(aiaa).selectSingleNode("is_custom").text)) eessee=trim(rep_xml_br(aasc(aiaa).selectSingleNode("custom_page_rem").text)) if trim(lcase(bbssbb))=trim(lcase(t)) then aassaafd=aassaa ddssddfd=ddssdd eesseefd=eessee exit for end if next if aassaafd<>"" then find_pty="" for iiitti=1 to xpx_length execute("assii=xpx_aim"&cstr(cint(iiitti))) if trim(assii)<>"" then if lcase(trim(split(assii,",")(0)))=lcase(trim(aassaafd)) then find_pty=trim(split(assii,",")(1)) exit for end if end if next end if if cstr(ddssddfd)="1" then find_ptyx=eesseefd else if find_pty="" then find_ptyx="" else find_ptyx=find_pty end if end if end function %> <script language=javascript> function show_newl(){ AJAXfade(0,'l_list'); AJAXfade(0,'l_do'); AJAXfade(0,'l_path'); AJAXfade(1,'newssss'); document.bgColor ="#eeeeee"; } function closen(){ AJAXfade(1,'l_list'); AJAXfade(1,'l_do'); AJAXfade(1,'l_path'); AJAXfade(0,'newssss'); document.bgColor ="#ffffff"; } function show_new1_window(){ self.location="D_add_a_template.asp?edittype=0&pname=<%=fnnnnnname%>&pid=<%=request("pid")%>&fpath=<%=request("fpath")%>&p_page=<%=request("page")%>"; } function show_new2_window(){ self.location="D_add_a_template.asp?edittype=1&pname=<%=fnnnnnname%>&pid=<%=request("pid")%>&fpath=<%=request("fpath")%>&p_page=<%=request("page")%>"; } function closen2(){ AJAXfade(1,'l_list'); AJAXfade(1,'l_do'); AJAXfade(1,'l_path'); AJAXfade(0,'newssss'); document.bgColor ="#ffffff"; } function del_conf(){ if (confirm("确认删除?")==1){ self.location="D_del_custom_folder.asp?pname=<%=fnnnnnname%>&pid=<%=request("pid")%>&fpath=<%=request("fpath")%>&p_page=<%=request("page")%>"; } } </script> <!------------------------------------------------div:new------------------------> <div id="newssss" style="filter:blendTrans(duration=1);left:1px;top:1px; visibility:hidden;display:none;width:200px; z-index:2; border: 1px dashed #999999;"> <table width="500" height="307" border="1" cellpadding="0" cellspacing="0" bgcolor="#cccccc" bordercolor="#333333"> <tr><td height="20" width=450 background="../images/titbg.gif" bordercolor="#333333"> 新建自定义模板标签 </td><td height="20" background="../images/titbg.gif" bordercolor="#333333"> <a href=# onClick="closen();">关闭</a> </td></tr> <tr><td colspan=3> <!-- <a href=# onClick="show_new1_window();">1.代码编辑方式 新建子模板</a><br><br--> <a href=# onClick="show_new2_window();">1.可视化编辑方式 新建子模板</a><br><br> 2.自己手动用dreamweaver在/templates/<%=fnnnnnname%>/目录下建立网页文件后刷新本页,并点击刷新所有页面</a><br><br> </td></tr> </table> </div> <!----------------------------end------div:new------------------------> <!------------------------------------------------div:new2 mode_select------------------------> <div id="newssss2" style="filter:blendTrans(duration=1);left:1px;top:1px; visibility:hidden;display:none;width:200px; z-index:2; border: 1px dashed #999999;"> <table width="500" height="307" border="1" cellpadding="0" cellspacing="0" bgcolor="#cccccc" bordercolor="#333333"> <tr><td height="20" width=450 background="../images/titbg.gif" bordercolor="#333333"> 选择编辑模式 </td><td height="20" background="../images/titbg.gif" bordercolor="#333333"> <a href=# onClick="closen2();">关闭</a> </td></tr> <tr><td colspan=3> <!-- <a href="D_add_custom_c_asp_lable.asp?edittype=0&fpath=<%=request("fpath")%>&p_page=<%=request("page")%>">代码视图编辑模式(可能乱码)</a><br><br--> <a href="D_add_custom_c_asp_lable.asp?edittype=1&fbpath=<%=fnnnnnname&"/"&request("fpath")%>&fpath=<%=request("fpath")%>&p_page=<%=request("page")%>">可视化编辑模式</a> </td></tr> </table> </div> <!----------------------------end------div:new2 mode_select------------------------> <% sssp=request("fpath") if sssp<>"" then sssspq=split(sssp,"/") ooosss="" sssr=ubound(sssspq)-1 dddds=sssspq(sssr) end if %> <div id="l_do" style="filter:blendTrans(duration=1); width:734px; z-index:-1; border: 1px dashed #999999;left: 3px; top: 20px; height: 40px;"> <table width=730 > <tr> <td> <span id=dellll> <input type="button" onClick="del_conf()" value="删除父文件夹(即 <%=dddds%>)" /> </span> <span id=xxllll> <input type="button" onClick="javascript:self.location='D_edit_custom_folder_name.asp?pname=<%=fnnnnnname%>&pid=<%=request("pid")%>&fpath=<%=request("fpath")%>&p_page=<%=request("page")%>';" value="修改父文件夹(即 <%=dddds%>)的名称" /> </span> <br><br> <span id=newf> <input type="button" onClick="javascript:self.location='D_add_custom_folder.asp?pname=<%=fnnnnnname%>&pid=<%=request("pid")%>&fpath=<%=request("fpath")%>';" value="添加文件夹" /> </span> <span id=ccc> <input type="button" onClick="javascript:self.location='D_copy_custom_folder.asp?pname=<%=fnnnnnname%>&pid=<%=request("pid")%>&fpath=<%=request("fpath")%>&p_page=<%=request("page")%>';" value="复制父文件夹(即 <%=dddds%>)及其子文件夹" /> </span> <br><br> <span id=newlb> <input type="button" onClick="show_newl();" value="在本级文件夹添加 子模板" /> </span> </td> </tr> </table> <% if request("fpath")="" then %> <script language="javascript"> dellll.style.display="none"; xxllll.style.display="none"; ccc.style.display="none"; </script> <% else %> <script language="javascript"> dellll.style.display="inline"; xxllll.style.display="inline"; ccc.style.display="inline"; </script> <% end if %> </div> <br /><br /> <div id="l_path" style="filter:blendTrans(duration=1); width:734px; z-index:-1; border: 1px dashed #999999;left: 3px; top: 120px; height: 30px;"> <table width=730 > <tr> <td> 当前路径:/templates/<%=fnnnnnname%>/<%=request("fpath")%> </td> </tr> </table> </div> <br /><br /> <div id="l_list" style="filter:blendTrans(duration=1); width:774px; z-index:-1; border: 1px dashed #999999;left: 3px; top: 120px; height: 121px;width:730px"> <table height="107" width=730 border="0" cellpadding="0" cellspacing="0" bordercolor="#999999"> <% set filea=new Cls_FSO set fileb=new DosAsp if filea.ReportFolderStatus(server.mappath("../../templates/"))=1 then call list_cst_label() else %> <script language="javascript"> alert("/Label/custom_Label/目录不存在,即将创建"); </script> <% call createfile("../../templates/test.asp","1111",true) call deletefile("../../templates/test.asp") call list_cst_label() end if nofolder=0 nofiles=0 function list_cst_label() ss3=filea.ShowFolderList(server.mappath("../../templates/"&fnnnnnname&"/"&request("fpath"))) ss4=filea.ShowFileList(server.mappath("../../templates/"&fnnnnnname&"/"&request("fpath"))) if ss3=-1 or ss3="" then nofolder=1 else ss3=left(ss3,len(ss3)-1)'去掉最后一个|号 '处理文件夹 fl1=split(ss3,"|") numf1=ubound(fl1)+1 end if if ss4=-1 or ss4="" then nofiles=1 else ss4=left(ss4,len(ss4)-1) '去掉最后一个|号 '处理文件 fl2=split(ss4,"|") numf2=ubound(fl2)+1 end if 'response.write numf1+numf2 redim flst(numf1+numf2,2) for i=0 to numf1-1 flst(i,0)=fl1(i) flst(i,1)=0 '=0表示文件夹 next for i=numf1 to numf1+numf2-1 ii=i-numf1 flst(i,0)=fl2(ii) flst(i,1)=1 '=1表示文件 next yy=5 xx=5 per_p=xx*yy if request("page")="" then npage=1 else npage=cint(request("page")) end if ptr=0 for iip=1 to npage-1 ptr=ptr+per_p next %> <tr width=730 align=left height=60> <td> <% sssp=request("fpath") sssspq=split(sssp,"/") ooosss="" for iii=0 to ubound(sssspq)-2 ooosss=ooosss&sssspq(iii)&"/" next %> <a href="D_edit_admin_zi_templates.asp?pid=<%=request("pid")%>&fpath=<%=ooosss%>"> <img src="../IMG/Folder/folder.gif" border=0>(返回上一级目录) </a> </td> </tr> <% for ix=1 to xx if (ptr-(npage-1)*per_p)>(per_p-1) or ptr>numf1+numf2-1 then exit for %> <tr width=730 align=center> <% for iy=1 to yy if (ptr-(npage-1)*per_p)>(per_p-1) or ptr>numf1+numf2-1 then exit for %> <% if request("fpath")="" then fph=replace(flst(ptr,0),"&","----")&"/" else sssd="/" if instr(request("fpath"),"/")<>0 then sssd="" fph=request("fpath")&sssd&replace(flst(ptr,0),"&","----")&"/" end if if flst(ptr,1)=0 then sss2="D_edit_admin_zi_templates.asp?pid="&request("pid")&"&fpath="&fph else sss2="D_edit_template_select.asp?pname="&fnnnnnname&"&pid="&request("pid")&"&fname="&fph&"&fpath="&request("fpath") end if %> <% if instr(1,fph,"ww_aspcpu_com_newdsoft_ruandingyuan_x",1)=0 then %> <td width=50 align=center> <table width=150 style="word-break:break-all" border=1 bordercolor=#cccccc> <tr> <td> <table width=150 style="word-break:break-all" border=0> <tr> <td> <% if flst(ptr,1)=0 then%> <a href="<%=sss2%>"> <img src="../IMG/Folder/folder.gif" border=0> </a> <%else%> <a href="<%=sss2%>"> <img src="../IMG/Label/label3.gif" border=0> </a> <%end if %> </td> </tr> <tr> <td width=160 style="word-break:break-all"> <a href="<%=sss2%>"> <%=flst(ptr,0)%> </a> </td> </tr> <% if flst(ptr,1)<>0 and is_have_nlist=1 then ssnmwxsr=find_ptyx(flst(ptr,0)) if trim(ssnmwxsr)<>"" then %> <tr> <td width=160 style="word-break:break-all"> 子模板页类型:<%response.write ssnmwxsr%> </td> </tr> <% end if end if %> <tr> <td width=160 style="word-break:break-all"> <% if flst(ptr,1)=1 then%> <a href="D_update_a_template.asp?pname=<%=fnnnnnname%>&pid=<%=request("pid")%>&fname=<%=fph%>&fpath=<%=request("fpath")%>" target="_blank"> <font color="#0000FF">刷新其对应的前台asp页面</font> </a> <br> <a href="D_edit_template_select.asp?pname=<%=fnnnnnname%>&pid=<%=request("pid")%>&fname=<%=fph%>&fpath=<%=request("fpath")%>"><font color="#0000FF">编辑</font></a> <%end if %> </td> </tr> </table> </td> </tr> </table> </td> <% else iy=iy-1 end if %> <% ptr=ptr+1 next %> </tr> <% next if nofiles=1 and nofolder=1 then %> <tr width=730 align=center><td> 此文件夹内无内容 </td> </tr> <%end if%> <tr width=730 align="center"><td align="center" colspan=8> <% zong_p=cint((numf1+numf2)/per_p) if ((numf1+numf2) mod per_p)>0 then zong_p=zong_p+1 end if if npage<zong_p then www3="<a href='D_edit_admin_zi_templates.asp?pid="&request("pid")&"&page="&npage+1&"&fpath="&request("fpath")&"'>下一页</a>" end if if npage>1 then www2="<a href='D_edit_admin_zi_templates.asp?pid="&request("pid")&"&page="&npage-1&"&fpath="&request("fpath")&"'>上一页</a>" end if if npage>=1 then www1="<a href='D_edit_admin_zi_templates.asp?pid="&request("pid")&"&page="&"1"&"&fpath="&request("fpath")&"'>首页</a>" end if if npage<=zong_p then www4="<a href='D_edit_admin_zi_templates.asp?pid="&request("pid")&"&page="&zong_p&"&fpath="&request("fpath")&"'>末页</a>" end if swww=" "&www1&" "&www2&" "&www3&" "&www4&" "&npage&"/"&zong_p&"页" %> <% =swww %> </td></tr> <% end function %> <table> </div> <script language=javascript> AJAXfade(1,'l_list') AJAXfade(1,'l_do') AJAXfade(1,'l_path') </script> <% AJAXcloseLoader() %> </html>